---
title: Writing Direction Provider
description: The WritingDirectionProvider can be used to allow the user to configure the dir for the entire app or partial tree.
docType: Demo
docGroup: Components
group: Providers
hooks: [useDir]
keywords: [typography, right-to-left, language]
components: [WritingDirectionProvider]
---

# Writing Direction Provider

The `WritingDirectionProvider` can be used to allow the user to configure the
`dir` for the entire app or partial tree.

## Simple Example

The top-most `WritingDirectionProvider` in the app will automatically set the
`dir` on the `html` element to match the current writing direction. Otherwise,
it will attempt to clone the `dir` as a prop into the child element.

```demo source="./SimpleExample.tsx"

```
